﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Header.ascx.cs" Inherits="Sites_Vigor_Webparts_Common_Header" %>
<%@ Register Src="../Common/Banner.ascx" TagName="Banner" TagPrefix="uc4" %>
<%@ Import Namespace="NTTHAO.CommonWeb" %>
<%@ Import Namespace="NTTHAO.Web.BL.CommonPage" %>
<%
    string bUrl = "/" + _Group.URLName + "/";
%>
<div class="hd">
<div class="wrapper">
    <div class="header-wrapper">
        <div class="logo">
            <a href="<%=WebGlobal.GetHost() %>"><img src="<%=this._VirtualURL %>Resources/images/logo.png" alt="Logo" title="<%=WebGlobal.GetSite().SiteName %>" /></a>
        </div>
        <div class="right-banner">
            <a href="http://www.women.nsw.gov.au/" target="_blank"><img alt="nsw" src="<%=this._VirtualURL %>Resources/images/nsw.jpg" /></a>
        </div>
        <div class="right-group" style="display: none;">
            <div class="hotline"><span class="text">HOTLINE</span><span class="number">078176774</span></div>
            <div class="lang"><a class="vi" href="/lang/vi/" title="Tiếng Việt">Tiếng Việt</a><a class="en" href="/lang/en/" title="English">English</a></div>
            <div class="search-box"><input type="text" note="Nội dung cần tìm" /><input type="submit" value="" /></div>
        </div>
    </div>
</div>
</div>
<div class="banner">
    <uc4:Banner ID="Banner1" runat="server" />
</div>
<div class="nav">
    <div class="wrapper">
    <div class="menu-wrapper">
        <div class="top-menu">
            <ul><%
    try
    {
        CommonGroupTree tree = CommonPageGroup.GetTree(_Group.ID);
        CommonMenuNode node = tree.Node.Children == null ? null : tree.Node.Children[0];
        while (node != null)
        {
            if (node.Menu.Active)
            {
                string nodeUrlPath = (bUrl + node.Menu.URLText + "/");
                string url = node.Menu.LinkType == 2 ? node.Menu.LinkURL : nodeUrlPath;
                bool hasChild = (node.Children != null && node.Children.Count > 0);
                url = hasChild ? "javascript: return false;" : url;
%>
                <li <%=node.Menu.ID == this._MID ? "class=\"active\"" : "" %>><a href="<%=url %>" target="<%=node.Menu.Target %>"><%=node.Menu.Text %></a><%
                if (hasChild)
                {
                    CommonMenuNode childNode = node.Children[0];
%>
                    <ul><%
                    while (childNode != null)
                    {
                        if (childNode.Menu.Active)
                        {
                            string childUrl = childNode.Menu.LinkType == 2 ? childNode.Menu.LinkURL : (nodeUrlPath + childNode.Menu.URLText + "/");
%>
                        <li><a <%=childNode.Menu.ID == this._SID ? "class=\"active\"" : "" %> href="<%=childUrl %>" target="<%=childNode.Menu.Target %>"><%=childNode.Menu.Text%></a></li><%
                        }
                        childNode = childNode.NextNode;
                    }
%>
                    </ul><% 
                } %></li><%
            }
            node = node.NextNode;
        }
    }
    catch { }
%>
            </ul>
        </div>
    </div>
    </div>
</div>